﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ANTLR_Question_Demo
{
    /// <summary>
    /// Interaction logic for MyButton.xaml
    /// </summary>
    public partial class MyButton : UserControl
    {
        public MyButton()
        {
            InitializeComponent();
        }
        double _Width = 100;
        public double width 
        {
            get
            {
                return _Width;
            }
            set
            {
                _Width = value;
                btConnect.Width = value;
            }
        }
        string _Content = "";
        public string Value
        {
            get
            {
                return _Content;
            }
            set 
            {
                _Content = value;
                lbConnect.Content = value;
            }
        }
        public void SetContent(string t)
        {
            lbConnect.Content = t;
        }
        private void lbConnect_MouseEnter(object sender, MouseEventArgs e)
        {
            btConnect.Fill = Brushes.DarkGreen;
        }

        private void lbConnect_MouseLeave(object sender, MouseEventArgs e)
        {
            btConnect.Fill = new SolidColorBrush(Color.FromRgb(12,12,12));
        }

        private void lbConnect_MouseDown(object sender, MouseButtonEventArgs e)
        {
            btConnect.Fill = Brushes.Green;
        }
        private void lbConnect_MouseUp(object sender, MouseButtonEventArgs e)
        {
            btConnect.Fill = Brushes.DarkGreen;
        }
    }
}
